package cn.tedu.spring.example;

import org.springframework.stereotype.Component;

import java.awt.*;
import java.lang.annotation.Annotation;

/**
 * @author tune_the last
 * @date 2025/11/6 - 12:10
 */
public class TestAnnotation {
    public static void main(String[] args) throws ClassNotFoundException {
        Class<?> clazz = Class.forName("cn.tedu.spring.example.User");
        Annotation[] annotations = clazz.getAnnotations();
        for (Annotation annotation : annotations){
            System.out.println(annotation.annotationType());
            for (Annotation a : annotation.annotationType().getAnnotations()){
                System.out.println("二级：" + a.annotationType());
            }

        }
    }
}
